﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 生产管理:生产订单基础输入参数
/// </summary>
public class ProductionorderBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 订单编码
    /// </summary>
    public virtual string? ProductionOrderCode { get; set; }
    
    /// <summary>
    /// 订单名称
    /// </summary>
    public virtual string? ProductionOrderName { get; set; }
    
    /// <summary>
    /// 订单来源
    /// </summary>
    public virtual string? ProductionOrdeSsource { get; set; }
    
    /// <summary>
    /// 产品编号
    /// </summary>
    public virtual long? ProductNumber { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public virtual long? ProductName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    public virtual string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 生产进度
    /// </summary>
    public virtual int? ProductionSchedule { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public virtual long? Unit { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    public virtual string? DatchNumber { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public virtual long? CustomerName { get; set; }
    
    /// <summary>
    /// 需求日期
    /// </summary>
    public virtual DateTime? DemandedDate { get; set; }
    
    /// <summary>
    /// 生产订单日期
    /// </summary>
    public virtual DateTime? ProductionOrderDate { get; set; }
    
    /// <summary>
    /// 生产日期
    /// </summary>
    public virtual DateTime? DateInProduced { get; set; }
    
    /// <summary>
    /// 订单数量
    /// </summary>
    public virtual int? ProductionOrderNumber { get; set; }
    
}

/// <summary>
/// 生产管理:生产订单分页查询输入参数
/// </summary>
public class PageProductionorderInput : BasePageInput
{
    /// <summary>
    /// 订单编码
    /// </summary>
    public string? ProductionOrderCode { get; set; }
    
    /// <summary>
    /// 订单名称
    /// </summary>
    public string? ProductionOrderName { get; set; }
    
    /// <summary>
    /// 产品编号
    /// </summary>
    public long? ProductNumber { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public long? ProductName { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 需求日期范围
    /// </summary>
     public DateTime?[] DemandedDateRange { get; set; }
    
    /// <summary>
    /// 订单数量
    /// </summary>
    public int? ProductionOrderNumber { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 生产管理:生产订单增加输入参数
/// </summary>
public class AddProductionorderInput
{
    /// <summary>
    /// 订单编码
    /// </summary>
    [MaxLength(32, ErrorMessage = "订单编码字符长度不能超过32")]
    public string? ProductionOrderCode { get; set; }
    
    /// <summary>
    /// 订单名称
    /// </summary>
    [MaxLength(32, ErrorMessage = "订单名称字符长度不能超过32")]
    public string? ProductionOrderName { get; set; }
    
    /// <summary>
    /// 订单来源
    /// </summary>
    [MaxLength(32, ErrorMessage = "订单来源字符长度不能超过32")]
    public string? ProductionOrdeSsource { get; set; }
    
    /// <summary>
    /// 产品编号
    /// </summary>
    public long? ProductNumber { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>
    public long? ProductName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 生产进度
    /// </summary>
    public int? ProductionSchedule { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public long? Unit { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [MaxLength(32, ErrorMessage = "批次号字符长度不能超过32")]
    public string? DatchNumber { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 需求日期
    /// </summary>
    public DateTime? DemandedDate { get; set; }
    
    /// <summary>
    /// 生产订单日期
    /// </summary>
    public DateTime? ProductionOrderDate { get; set; }
    
    /// <summary>
    /// 生产日期
    /// </summary>
    public DateTime? DateInProduced { get; set; }
    
    /// <summary>
    /// 订单数量
    /// </summary>
    public int? ProductionOrderNumber { get; set; }
    
}

/// <summary>
/// 生产管理:生产订单删除输入参数
/// </summary>
public class DeleteProductionorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 生产管理:生产订单更新输入参数
/// </summary>
public class UpdateProductionorderInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 订单编码
    /// </summary>    
    [MaxLength(32, ErrorMessage = "订单编码字符长度不能超过32")]
    public string? ProductionOrderCode { get; set; }
    
    /// <summary>
    /// 订单名称
    /// </summary>    
    [MaxLength(32, ErrorMessage = "订单名称字符长度不能超过32")]
    public string? ProductionOrderName { get; set; }
    
    /// <summary>
    /// 订单来源
    /// </summary>    
    [MaxLength(32, ErrorMessage = "订单来源字符长度不能超过32")]
    public string? ProductionOrdeSsource { get; set; }
    
    /// <summary>
    /// 产品编号
    /// </summary>    
    public long? ProductNumber { get; set; }
    
    /// <summary>
    /// 产品名称
    /// </summary>    
    public long? ProductName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "规格型号字符长度不能超过32")]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 生产进度
    /// </summary>    
    public int? ProductionSchedule { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>    
    public long? Unit { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "批次号字符长度不能超过32")]
    public string? DatchNumber { get; set; }
    
    /// <summary>
    /// 客户名称
    /// </summary>    
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 需求日期
    /// </summary>    
    public DateTime? DemandedDate { get; set; }
    
    /// <summary>
    /// 生产订单日期
    /// </summary>    
    public DateTime? ProductionOrderDate { get; set; }
    
    /// <summary>
    /// 生产日期
    /// </summary>    
    public DateTime? DateInProduced { get; set; }
    
    /// <summary>
    /// 订单数量
    /// </summary>    
    public int? ProductionOrderNumber { get; set; }
    
}

/// <summary>
/// 生产管理:生产订单主键查询输入参数
/// </summary>
public class QueryByIdProductionorderInput : DeleteProductionorderInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataProductionorderInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 生产管理:生产订单数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportProductionorderInput : BaseImportInput
{
    /// <summary>
    /// 订单编码
    /// </summary>
    [ImporterHeader(Name = "订单编码")]
    [ExporterHeader("订单编码", Format = "", Width = 25, IsBold = true)]
    public string? ProductionOrderCode { get; set; }
    
    /// <summary>
    /// 订单名称
    /// </summary>
    [ImporterHeader(Name = "订单名称")]
    [ExporterHeader("订单名称", Format = "", Width = 25, IsBold = true)]
    public string? ProductionOrderName { get; set; }
    
    /// <summary>
    /// 订单来源
    /// </summary>
    [ImporterHeader(Name = "订单来源")]
    [ExporterHeader("订单来源", Format = "", Width = 25, IsBold = true)]
    public string? ProductionOrdeSsource { get; set; }
    
    /// <summary>
    /// 产品编号 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? ProductNumber { get; set; }
    
    /// <summary>
    /// 产品编号 文本
    /// </summary>
    [ImporterHeader(Name = "产品编号")]
    [ExporterHeader("产品编号", Format = "", Width = 25, IsBold = true)]
    public string ProductNumberFkDisplayName { get; set; }
    
    /// <summary>
    /// 产品名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? ProductName { get; set; }
    
    /// <summary>
    /// 产品名称 文本
    /// </summary>
    [ImporterHeader(Name = "产品名称")]
    [ExporterHeader("产品名称", Format = "", Width = 25, IsBold = true)]
    public string ProductNameFkDisplayName { get; set; }
    
    /// <summary>
    /// 规格型号
    /// </summary>
    [ImporterHeader(Name = "规格型号")]
    [ExporterHeader("规格型号", Format = "", Width = 25, IsBold = true)]
    public string? SpecificationModel { get; set; }
    
    /// <summary>
    /// 生产进度
    /// </summary>
    [ImporterHeader(Name = "生产进度")]
    [ExporterHeader("生产进度", Format = "", Width = 25, IsBold = true)]
    public int? ProductionSchedule { get; set; }
    
    /// <summary>
    /// 单位 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Unit { get; set; }
    
    /// <summary>
    /// 单位 文本
    /// </summary>
    [ImporterHeader(Name = "单位")]
    [ExporterHeader("单位", Format = "", Width = 25, IsBold = true)]
    public string UnitFkDisplayName { get; set; }
    
    /// <summary>
    /// 批次号
    /// </summary>
    [ImporterHeader(Name = "批次号")]
    [ExporterHeader("批次号", Format = "", Width = 25, IsBold = true)]
    public string? DatchNumber { get; set; }
    
    /// <summary>
    /// 客户名称 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? CustomerName { get; set; }
    
    /// <summary>
    /// 客户名称 文本
    /// </summary>
    [ImporterHeader(Name = "客户名称")]
    [ExporterHeader("客户名称", Format = "", Width = 25, IsBold = true)]
    public string CustomerNameFkDisplayName { get; set; }
    
    /// <summary>
    /// 需求日期
    /// </summary>
    [ImporterHeader(Name = "需求日期")]
    [ExporterHeader("需求日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? DemandedDate { get; set; }
    
    /// <summary>
    /// 生产订单日期
    /// </summary>
    [ImporterHeader(Name = "生产订单日期")]
    [ExporterHeader("生产订单日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? ProductionOrderDate { get; set; }
    
    /// <summary>
    /// 生产日期
    /// </summary>
    [ImporterHeader(Name = "生产日期")]
    [ExporterHeader("生产日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? DateInProduced { get; set; }
    
    /// <summary>
    /// 订单数量
    /// </summary>
    [ImporterHeader(Name = "订单数量")]
    [ExporterHeader("订单数量", Format = "", Width = 25, IsBold = true)]
    public int? ProductionOrderNumber { get; set; }
    
}
